<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2011 Alex Paréj.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>#{empty title ? msg.mkdir : title}</title>
        <h:outputStylesheet library="style" name="mkdir.css"/>
    </h:head>
    <h:body>
        <f:view contentType="text/html">
            <p:growl autoUpdate="true" showDetail="true"
                     life="#{felhasznaloSessionController.felhasznalo.infoAblakMegjlHossza*1000}"/>
            <p:idleMonitor timeout="#{rendszerbeallitasokSzerkeszteseController.inaktivitasIdokorlatEzredmasodpercben}">
                <p:ajax event="idle" listener="#{felhasznaloSessionController.lejartIdokorlatListener()}"/>
            </p:idleMonitor> 
            <h:form id="menu">
                <p:ajaxStatus style="float:right;margin: 2px 0;">  
                    <f:facet name="start">  
                        <table>
                            <tr>
                                <td><h:graphicImage library="images" name="ajax-loader.gif"/> </td>
                            </tr>
                        </table>
                    </f:facet>  

                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>  
                </p:ajaxStatus> 
                <p:menubar style="margin-bottom: 5px;margin-right: 28px;">
                    <p:submenu label="#{felhasznaloSessionController.felhasznalo.email}" icon="ui-icon ui-icon-home">
                        <p:menuitem value="#{msg.adataim}" icon="ui-icon ui-icon-contact"
                                    update=":adataimForm" oncomplete="adataimDlg.show()"/>
                        <p:menuitem value="#{msg.beallitasaim}" icon="ui-icon ui-icon-wrench"
                                    update=":beallitasaimForm" oncomplete="beallitasaimDlg.show()"/>
                        <p:menuitem value="#{msg.dokumentumaim}" icon="ui-icon ui-icon-document" url="/felhasznalo/dokumentumaim.jsf"/>
                        <p:menuitem value="#{msg.lomtar}" icon="ui-icon ui-icon-trash" url="/felhasznalo/lomtar.jsf" rendered="#{menuController.renderedLomtar}"/>
                        <p:menuitem icon="ui-icon ui-icon-close" value="#{msg.signOut}"
                                    actionListener="#{felhasznaloSessionController.kijelentkezesListener()}"/>
                    </p:submenu>
                    <p:submenu icon="ui-icon ui-icon-suitcase" label="#{msg.megosztasok}">
                        <p:menuitem value="#{msg.kedvencek}" icon="ui-icon ui-icon-star" url="/megosztasok/kedvencMegosztasok.jsf"/>
                        <p:menuitem value="#{msg.szemelyes}" icon="ui-icon ui-icon-person" url="/megosztasok/szemelyesMegosztasok.jsf"/>
                        <p:menuitem value="#{msg.publikus}" icon="ui-icon ui-icon-unlocked" url="/megosztasok/publikusMegosztasok.jsf"/>
                    </p:submenu>
                    <p:menuitem value="#{msg.felhasznalok}" icon="ui-icon ui-icon-person" url="/felhasznalok.jsf"/>
                    <p:submenu label="#{msg.adminisztracio}" icon="ui-icon ui-icon-gear" rendered="#{menuController.renderedAdminisztracio}">
                        <p:menuitem icon="ui-icon ui-icon-mail-closed" value="#{msg.emailKuldes}" url="/admin/emailKuldes.jsf"/>
                        <p:menuitem icon="ui-icon ui-icon-person" value="#{msg.felhasznalok}" url="/admin/felhasznalokSzerkesztese.jsf"/>
                        <p:menuitem icon="ui-icon ui-icon-wrench" value="#{msg.rendszerbeallitasok}" url="/admin/rendszerbeallitasokSzerkesztese.jsf"/>
                    </p:submenu>
                    <p:submenu label="#{msg.mkdir}" icon="ui-icon ui-icon-signal-diag">
                        <p:menuitem icon="ui-icon ui-icon-info" value="#{msg.nevjegy}" onclick="nevjegyDlg.show()"/>
                        <p:menuitem icon="ui-icon ui-icon-notice" value="#{msg.hibabejelentes}" url="http://code.google.com/p/mkdir/issues/entry?template=Defect%20report%20from%20user"/>
                    </p:submenu>
                </p:menubar>
            </h:form>
            <ui:include src="/WEB-INF/facelets/felhasznalo/adataimBeallitasaimDialogok.xhtml"/>
            <p:dialog widgetVar="nevjegyDlg" header="#{msg.nevjegy} - #{msg.mkdir}" dynamic="true" resizable="false"
                      modal="true">
                <ui:include src="/WEB-INF/facelets/nevjegyMezok.xhtml"/>
                <div class="dialogGombokDoboz">
                    <p:button icon="ui-icon-close" value="#{msg.bezar}" onclick="nevjegyDlg.hide();return false;"/>
                </div>
            </p:dialog>
            <ui:insert name="body"/>               
        </f:view>
    </h:body>
</html>

